/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package entityprojet;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author Ron
 */
@Entity
@Table(name = "F_TAXE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "FTaxe.findAll", query = "SELECT f FROM FTaxe f"),
    @NamedQuery(name = "FTaxe.findByTAIntitule", query = "SELECT f FROM FTaxe f WHERE f.tAIntitule = :tAIntitule"),
    @NamedQuery(name = "FTaxe.findByTATTaux", query = "SELECT f FROM FTaxe f WHERE f.tATTaux = :tATTaux"),
    @NamedQuery(name = "FTaxe.findByTATaux", query = "SELECT f FROM FTaxe f WHERE f.tATaux = :tATaux"),
    @NamedQuery(name = "FTaxe.findByTAType", query = "SELECT f FROM FTaxe f WHERE f.tAType = :tAType"),
    @NamedQuery(name = "FTaxe.findByTANo", query = "SELECT f FROM FTaxe f WHERE f.tANo = :tANo"),
    @NamedQuery(name = "FTaxe.findByTACode", query = "SELECT f FROM FTaxe f WHERE f.tACode = :tACode"),
    @NamedQuery(name = "FTaxe.findByTaNp", query = "SELECT f FROM FTaxe f WHERE f.taNp = :taNp"),
    @NamedQuery(name = "FTaxe.findByTASens", query = "SELECT f FROM FTaxe f WHERE f.tASens = :tASens"),
    @NamedQuery(name = "FTaxe.findByTAProvenance", query = "SELECT f FROM FTaxe f WHERE f.tAProvenance = :tAProvenance"),
    @NamedQuery(name = "FTaxe.findByTARegroup", query = "SELECT f FROM FTaxe f WHERE f.tARegroup = :tARegroup"),
    @NamedQuery(name = "FTaxe.findByTAAssujet", query = "SELECT f FROM FTaxe f WHERE f.tAAssujet = :tAAssujet"),
    @NamedQuery(name = "FTaxe.findByTAGrilleBase", query = "SELECT f FROM FTaxe f WHERE f.tAGrilleBase = :tAGrilleBase"),
    @NamedQuery(name = "FTaxe.findByTAGrilleTaxe", query = "SELECT f FROM FTaxe f WHERE f.tAGrilleTaxe = :tAGrilleTaxe"),
    @NamedQuery(name = "FTaxe.findByCbProt", query = "SELECT f FROM FTaxe f WHERE f.cbProt = :cbProt"),
    @NamedQuery(name = "FTaxe.findByCbMarq", query = "SELECT f FROM FTaxe f WHERE f.cbMarq = :cbMarq"),
    @NamedQuery(name = "FTaxe.findByCbCreateur", query = "SELECT f FROM FTaxe f WHERE f.cbCreateur = :cbCreateur"),
    @NamedQuery(name = "FTaxe.findByCbModification", query = "SELECT f FROM FTaxe f WHERE f.cbModification = :cbModification"),
    @NamedQuery(name = "FTaxe.findByCbReplication", query = "SELECT f FROM FTaxe f WHERE f.cbReplication = :cbReplication"),
    @NamedQuery(name = "FTaxe.findByCbFlag", query = "SELECT f FROM FTaxe f WHERE f.cbFlag = :cbFlag")})
public class FTaxe implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "TA_Intitule")
    private String tAIntitule;
    @Lob
    @Column(name = "cbTA_Intitule")
    private byte[] cbTAIntitule;
    @Column(name = "TA_TTaux")
    private Short tATTaux;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "TA_Taux")
    private BigDecimal tATaux;
    @Column(name = "TA_Type")
    private Short tAType;
    @Lob
    @Column(name = "cbCG_Num")
    private byte[] cbCGNum;
    @Basic(optional = false)
    @Column(name = "TA_No")
    private int tANo;
    @Basic(optional = false)
    @Column(name = "TA_Code")
    private String tACode;
    @Lob
    @Column(name = "cbTA_Code")
    private byte[] cbTACode;
    @Column(name = "TA_NP")
    private Short taNp;
    @Column(name = "TA_Sens")
    private Short tASens;
    @Column(name = "TA_Provenance")
    private Short tAProvenance;
    @Column(name = "TA_Regroup")
    private String tARegroup;
    @Lob
    @Column(name = "cbTA_Regroup")
    private byte[] cbTARegroup;
    @Column(name = "TA_Assujet")
    private BigDecimal tAAssujet;
    @Column(name = "TA_GrilleBase")
    private String tAGrilleBase;
    @Column(name = "TA_GrilleTaxe")
    private String tAGrilleTaxe;
    @Column(name = "cbProt")
    private Short cbProt;
    @Id
    @Basic(optional = false)
    @Column(name = "cbMarq")
    private Integer cbMarq;
    @Column(name = "cbCreateur")
    private String cbCreateur;
    @Column(name = "cbModification")
    @Temporal(TemporalType.TIMESTAMP)
    private Date cbModification;
    @Column(name = "cbReplication")
    private Integer cbReplication;
    @Column(name = "cbFlag")
    private Short cbFlag;
    @JoinColumn(name = "CG_Num", referencedColumnName = "CG_Num")
    @ManyToOne(optional = false)
    private FCompteg cGNum;
    @OneToMany(mappedBy = "tACode")
    private Collection<FCompteg> fComptegCollection;

    public FTaxe() {
    }

    public FTaxe(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public FTaxe(Integer cbMarq, int tANo, String tACode) {
        this.cbMarq = cbMarq;
        this.tANo = tANo;
        this.tACode = tACode;
    }

    public String getTAIntitule() {
        return tAIntitule;
    }

    public void setTAIntitule(String tAIntitule) {
        this.tAIntitule = tAIntitule;
    }

    public byte[] getCbTAIntitule() {
        return cbTAIntitule;
    }

    public void setCbTAIntitule(byte[] cbTAIntitule) {
        this.cbTAIntitule = cbTAIntitule;
    }

    public Short getTATTaux() {
        return tATTaux;
    }

    public void setTATTaux(Short tATTaux) {
        this.tATTaux = tATTaux;
    }

    public BigDecimal getTATaux() {
        return tATaux;
    }

    public void setTATaux(BigDecimal tATaux) {
        this.tATaux = tATaux;
    }

    public Short getTAType() {
        return tAType;
    }

    public void setTAType(Short tAType) {
        this.tAType = tAType;
    }

    public byte[] getCbCGNum() {
        return cbCGNum;
    }

    public void setCbCGNum(byte[] cbCGNum) {
        this.cbCGNum = cbCGNum;
    }

    public int getTANo() {
        return tANo;
    }

    public void setTANo(int tANo) {
        this.tANo = tANo;
    }

    public String getTACode() {
        return tACode;
    }

    public void setTACode(String tACode) {
        this.tACode = tACode;
    }

    public byte[] getCbTACode() {
        return cbTACode;
    }

    public void setCbTACode(byte[] cbTACode) {
        this.cbTACode = cbTACode;
    }

    public Short getTaNp() {
        return taNp;
    }

    public void setTaNp(Short taNp) {
        this.taNp = taNp;
    }

    public Short getTASens() {
        return tASens;
    }

    public void setTASens(Short tASens) {
        this.tASens = tASens;
    }

    public Short getTAProvenance() {
        return tAProvenance;
    }

    public void setTAProvenance(Short tAProvenance) {
        this.tAProvenance = tAProvenance;
    }

    public String getTARegroup() {
        return tARegroup;
    }

    public void setTARegroup(String tARegroup) {
        this.tARegroup = tARegroup;
    }

    public byte[] getCbTARegroup() {
        return cbTARegroup;
    }

    public void setCbTARegroup(byte[] cbTARegroup) {
        this.cbTARegroup = cbTARegroup;
    }

    public BigDecimal getTAAssujet() {
        return tAAssujet;
    }

    public void setTAAssujet(BigDecimal tAAssujet) {
        this.tAAssujet = tAAssujet;
    }

    public String getTAGrilleBase() {
        return tAGrilleBase;
    }

    public void setTAGrilleBase(String tAGrilleBase) {
        this.tAGrilleBase = tAGrilleBase;
    }

    public String getTAGrilleTaxe() {
        return tAGrilleTaxe;
    }

    public void setTAGrilleTaxe(String tAGrilleTaxe) {
        this.tAGrilleTaxe = tAGrilleTaxe;
    }

    public Short getCbProt() {
        return cbProt;
    }

    public void setCbProt(Short cbProt) {
        this.cbProt = cbProt;
    }

    public Integer getCbMarq() {
        return cbMarq;
    }

    public void setCbMarq(Integer cbMarq) {
        this.cbMarq = cbMarq;
    }

    public String getCbCreateur() {
        return cbCreateur;
    }

    public void setCbCreateur(String cbCreateur) {
        this.cbCreateur = cbCreateur;
    }

    public Date getCbModification() {
        return cbModification;
    }

    public void setCbModification(Date cbModification) {
        this.cbModification = cbModification;
    }

    public Integer getCbReplication() {
        return cbReplication;
    }

    public void setCbReplication(Integer cbReplication) {
        this.cbReplication = cbReplication;
    }

    public Short getCbFlag() {
        return cbFlag;
    }

    public void setCbFlag(Short cbFlag) {
        this.cbFlag = cbFlag;
    }

    public FCompteg getCGNum() {
        return cGNum;
    }

    public void setCGNum(FCompteg cGNum) {
        this.cGNum = cGNum;
    }

    @XmlTransient
    public Collection<FCompteg> getFComptegCollection() {
        return fComptegCollection;
    }

    public void setFComptegCollection(Collection<FCompteg> fComptegCollection) {
        this.fComptegCollection = fComptegCollection;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (cbMarq != null ? cbMarq.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof FTaxe)) {
            return false;
        }
        FTaxe other = (FTaxe) object;
        if ((this.cbMarq == null && other.cbMarq != null) || (this.cbMarq != null && !this.cbMarq.equals(other.cbMarq))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.FTaxe[ cbMarq=" + cbMarq + " ]";
    }
    
}
